package com.pearadmin.pro.modules.mkt.service.impl;

import java.util.List;
import java.util.ArrayList;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pearadmin.pro.common.web.base.page.PageResponse;
import com.pearadmin.pro.common.web.base.page.Pageable;

import com.pearadmin.pro.modules.mkt.domain.MktActivePayment;
import com.pearadmin.pro.modules.mkt.param.MktActivePaymentRequest;
import com.pearadmin.pro.modules.mkt.repository.MktActivePaymentRepository;
import com.pearadmin.pro.modules.mkt.service.MktActivePaymentService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;


/**
 * 市场活动付款信息Service业务层处理
 *
 * @author chenJian
 * @date 2021-09-09
 */
@Service
public class MktActivePaymentServiceImpl extends ServiceImpl<MktActivePaymentRepository, MktActivePayment> implements MktActivePaymentService
{
    @Resource
    private MktActivePaymentRepository mktActivePaymentRepository;

    /**
     * 查询市场活动付款信息
     * @param request
     * @return 市场活动付款信息 分页集合
     * */
    @Override
    public PageResponse<MktActivePayment> page(MktActivePaymentRequest request)
    {
        LambdaQueryWrapper<MktActivePayment> query = new LambdaQueryWrapper<MktActivePayment>();
        return Pageable.of(request,(()->  mktActivePaymentRepository.selectList(query)));
    }

    /**
     * 查询市场活动付款信息
     *
     * @param id 市场活动付款信息ID
     * @return 市场活动付款信息
     */
    @Override
    public MktActivePayment selectMktActivePaymentById(Long id)
    {
        return mktActivePaymentRepository.selectById(id);
    }

}
